<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:useBean id="uploadFileForm" scope="session" class="mypack.form.UploadFileForm"/>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>上传作业</title>
</head>
<%           
             if(request.getSession().getAttribute("check_code") != null){
%>
<% request.setCharacterEncoding("utf-8"); %>
<% uploadFileForm.setParameters(request, response); %>
<body>
<h3>上传作业</h3>
请选择要上传的作业 <br /><br />
<% String test = uploadFileForm.getHname();
  out.println(test + "    这是测试结果:    " + test);%>
 <%int i = 0; %>
<form action="UploadFile.jsp?hname=<%=uploadFileForm.getHname()%>" method="post"
                        enctype="multipart/form-data">
<input type="file" name="file" size="50" />
<input type="hidden" size="20" name="hname" value="作业一">
<br />
<input type="submit" value="提交" />
 
</form>

</body>


</html>
<%
}
            else{
            	out.print( " <a href='http://localhost:8080/Final/index.jsp'>请登录</a>");
            }
%>